home *** CD-ROM | disk | FTP | other *** search
- Batch
- Commands
-
- ASK subcommand
-
-
- Purpose: This command allows the user to set the BATCH
- environment ERRORLEVELS interactively.
-
- Format: ASK [prompt line]
-
- Type: Internal External
- ***
-
- Remarks: This command is designed to be used
- interactively. It allows the user some manual
- input into the BATCH envirionment. The 'prompt
- line' parameter is optional.
-
- Example: ASK Do you want to go to PAS2 ?
-
- This command accepts a single character from
- the user and sets ERRORLEVEL based on whether
- Y or N was entered. Y or y will set ERRORLEVEL
- 0, N or n will set ERRORLEVEL 1
-
- ASK
-
- Displays 'Press Y or N ' on the console and
- waits for a keypress.
-
- (Sample BATCH file)
-
- ASK
- IF ERRORLEVEL 1 GOTO PRESSEDNO
- ECHO You pressed Y or y.
- GOTO end
- :PRESSEDNO
- ECHO You pressed N or n
- :end
-
- NOTES:
-
- ASK accepts only Y, y, N, or n as a
- response in this version.
- ECHO You pressed N or n
- :end
-
-